A good answer might be:

Yes.


How try and catch Work

Here is how try and catch work:

  1. When an exception is thrown by a statement in the try{} block, the catch{} blocks are examined one-by-one starting starting with the first.


  2. Only one catch{} block is picked.


  3. If no catch{} block matches the exception, none is picked, and execution leaves this method (just as if there were no try{} block.)


  4. The first catch{} block to match the type of the exception gets control.


  5. The most specific exception types should appear first in the structure, followed by the more general exception types.


  6. The statements in the chosen catch{} block execute sequentially. After the last statement executes, control goes to the first statement that follows the try/catch structure.


  7. Control does not return to the try block.

QUESTION 7:

Must the catch{} blocks list all possible exceptions?